# -*- coding: utf-8 -*-
# @Time : 2023/11/21 8:26 PM 
# @Author : Wayne
# @Email : 1
# @File : dic_key_vaule.py
# @Project : young_python_demo
# @DESCRIPTION :

def split_key_value():
    # 定义一个字典
    data = {"name": "张三", "age": 20, "height": 180}

    # 提取字典中的所有键
    keys = data.keys()
    for key in keys:
        print(key)

    # 提取字典中的所有值
    values = data.values()
    for value in values:
        print(value)


def items_key_value():
    # 定义一个字典
    data = {"name": "张三", "age": 20, "height": 180}

    # 提取字典中的所有键和值
    items = data.items()
    for key, value in items:
        print(key, value)

items_key_value()

